Conversation
Bug 1: Spaces pages double-rendered MainLayout
- Remove <MainLayout> wrapper from templates in Index/Create/Edit.vue
- Add defineOptions({ layout: MainLayout }) to each page
- Remove duplicate Spaces nav entry in MainLayout.vue (keep 🏢, remove 🌐)
Bug 2: Media upload URL was overcorrected to /api/media (404)
- Fix MediaUploadZone.vue: xhr.open to /api/v1/media
- Fix Media/Index.vue: fetch URLs to /api/v1/media and /api/v1/media/:id
- Add X-Requested-With header to XHR upload
Bug 3: Knowledge Graph still 401
- Fix KnowledgeGraphViewer.vue: credentials 'same-origin' -> 'include'
- Add decodeURIComponent() to XSRF token extraction
Bug 4: Locales page redirects instead of staying on page
- Replace ALL router.post/patch/delete with fetch() API calls
- Use router.reload({ only: ['locales'] }) after successful ops
- Add proper Sanctum auth headers (X-XSRF-TOKEN, X-Requested-With)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 4 production UI bugs in the admin panel.
Bug 1: Spaces pages rendered MainLayout TWICE
<MainLayout>wrapper from templates inIndex.vue,Create.vue,Edit.vuedefineOptions({ layout: MainLayout })to each Spaces page (proper Inertia pattern)MainLayout.vue(kept 🏢, removed 🌐)Bug 2: Media upload URL was 404
MediaUploadZone.vue: Fixed URL from/api/media→/api/v1/mediaMedia/Index.vue: Fixed fetch URLs to use/api/v1/mediaprefixX-Requested-With: XMLHttpRequestheader to XHR uploadBug 3: Knowledge Graph still 401
KnowledgeGraphViewer.vue: Changedcredentials: same-origin→includedecodeURIComponent()to XSRF-TOKEN cookie extractionBug 4: Locale management redirected instead of staying on page
Locales.vue: Replaced allrouter.post/patch/deletewithfetch()API callsrouter.reload({ only: ["locales"] })to refresh dataQuality Gates